﻿using System;
using System.IO;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.Odbc;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class public_html_NewSite_CMSV2_FrontPage : System.Web.UI.Page
{
    string ID = Guid.NewGuid().ToString();

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void BtmSaveTop_Click(object sender, EventArgs e)
    {
        ReviewerMySql SQL = new ReviewerMySql();
        string PathSave = Server.MapPath("../FrontBilledTop/");
        string Ext = Path.GetExtension(FileTop.PostedFile.FileName);
        SQL.ExecuteNonQuery("INSERT INTO V2_ForsideTop(ID, Titel, Link, Tekst) VALUES('" + ID + "','" + txtTitel.Text + "','" + txtLink.Text + "','" + txtTekst.Text + "')");
        FileTop.SaveAs(PathSave + ID + Ext);
        Response.Redirect("Message.aspx?Div=1&MSG= Top Billedet blev oprettet");
    }
}
